package cn.iocoder.ny.module.mall.service;

import cn.iocoder.ny.module.mall.controller.admin.product.dto.MallProductListDTO;
import cn.iocoder.ny.module.mall.domain.MallProductSpecification;
import com.baomidou.mybatisplus.extension.service.IService;

public interface IMallProductSpecificationSerivce extends IService<MallProductSpecification> {

    boolean upadteProductStock(MallProductListDTO mallProductListDTO);

    boolean updateProductSell(MallProductListDTO mallProductListDTO);

    boolean updateProductStockBySQL(MallProductListDTO mallProductListDTO);

    boolean updateProductStockBySQLADD(MallProductListDTO mallProductListDTO);

    //todo 扣口库2 reduce inventory 2 condition
    boolean reduceProductStockBySQLCondition(MallProductListDTO mallProductListDTO);


    int updateStockBySpecIdAndOrderStatus(Integer stock, Long specificationId, Long orderId);
}
